Skip to content

Conversation

@Nezaemmy
Copy link

@Nezaemmy Nezaemmy commented Dec 1, 2025

Updated Matter settings to include WiFi and OpenThread configurations, and added endpoint IDs for both networks.

Description

Related

Testing


Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

Updated Matter settings to include WiFi and OpenThread configurations, and added endpoint IDs for both networks.
@me-no-dev
Copy link
Member

@Nezaemmy I think this caused issues.

@SuGlider PTAL

@Nezaemmy
Copy link
Author

Nezaemmy commented Dec 1, 2025

@Nezaemmy I think this caused issues.

@SuGlider PTAL

On esp32c5 Matter over Wi-Fi is disabled. Refer to defconfig.esp32c6 has the same Radios as esp32c5

@me-no-dev
Copy link
Member

On esp32c5 Matter over Wi-Fi is disabled.

As far as I remember, this is on purpose. Matter + WiFi could not fit in the memory. @SuGlider will explain further.

@SuGlider
Copy link
Contributor

SuGlider commented Dec 1, 2025

@Nezaemmy I think this caused issues.
@SuGlider PTAL

On esp32c5 Matter over Wi-Fi is disabled. Refer to defconfig.esp32c6 has the same Radios as esp32c5

Hi @Nezaemmy - C5 and C6 are quite the same about WiFi, OpenThread and Matter.
Arduino Libraries for the Arduino IDE are precompiled, therefore it requires picking an IDF / Component settings (sdkconfig).

Based on the ESP-Matter Library, currently, it is not possible to have both, WiFi and OpenThread running over Matter.
It is not also possible to pick one or another using user functions.
ESP-Matter will always pick first WiFi, even when it has been also configured to run over OpenThread.

C5 has less SRAM than C6, 384KB vs 512KB.
Therefore we decided to configure it with just OpenThread support for Matter.
It can also run over WiFi, but we would leave it for an Arduino as IDF Component project configuration.

C5 also can't have more endpoints, like the C6 because of the RAM limitation.

I'd like to hear from you about your point of view about it.

@Nezaemmy
Copy link
Author

Nezaemmy commented Dec 1, 2025

@Nezaemmy I think this caused issues.

@SuGlider PTAL

On esp32c5 Matter over Wi-Fi is disabled. Refer to defconfig.esp32c6 has the same Radios as esp32c5

Hi @Nezaemmy - C5 and C6 are quite the same about WiFi, OpenThread and Matter.

Arduino Libraries for the Arduino IDE are precompiled, therefore it requires picking an IDF / Component settings (sdkconfig).

Based on the ESP-Matter Library, currently, it is not possible to have both, WiFi and OpenThread running over Matter.

It is not also possible to pick one or another using user functions.

ESP-Matter will always pick first WiFi, even when it has been also configured to run over OpenThread.

C5 has less SRAM than C6, 384KB vs 512KB.

Therefore we decided to configure it with just OpenThread support for Matter.

It can also run over WiFi, but we would leave it for an Arduino as IDF Component project configuration.

C5 also can't have more endpoints, like the C6 because of the RAM limitation.

I'd like to hear from you about your point of view about it.

@SuGlider Thank you for your detailed response! Since Wi-Fi is far more popular than OpenThread, I believe it would be better for us to prioritize Wi-Fi support. All my current projects are based on Matter over Wi-Fi, and leveraging the ESP32-C5’s dual-band capability (2.4 GHz and 5 GHz) would be a great advantage.
If this proposed change happens, I promise to thoroughly test this feature and share my final thoughts with you. I work on Matter projects daily, so I have enough time and experience to provide meaningful feedback. Arduino as IDF Component project configuration requires additional skills it's not user friendly as Arduino library

@SuGlider
Copy link
Contributor

SuGlider commented Dec 2, 2025

OK, it sounds good that the C5 could support Matter over WiFi 5GHz instead of over Thread.
H2 will be the one for Matter over Thread.

@SuGlider
Copy link
Contributor

SuGlider commented Dec 2, 2025

Let me check which configuration will run with the C5.

@Nezaemmy
Copy link
Author

Nezaemmy commented Dec 5, 2025

Let me check which configuration will run with the C5.

@SuGlider Is there any update?

@Nezaemmy Nezaemmy closed this Dec 5, 2025
@Nezaemmy Nezaemmy reopened this Dec 5, 2025
@SuGlider
Copy link
Contributor

SuGlider commented Dec 8, 2025

Let me check which configuration will run with the C5.

@SuGlider Is there any update?

I'll get it done in the next 2 days.

@SuGlider
Copy link
Contributor

SuGlider commented Dec 18, 2025

25 endpoint caused error with Ocupancy + holdTime feature. Trying with 16 instead.

Enhanced Light fails commissioning with 25 endpoints enabled.

[    14][I][MatterEnhancedColorLight.cpp:213] begin(): Enhanced ColorLight created with endpoint_id 1
E (565) wifi:Expected to init 8 rx buffer, actual is 4
E (588) wifi_init: Failed to deinit Wi-Fi driver (0x3001)
E (588) wifi_init: Failed to deinit Wi-Fi (0x3001)
E (588) esp_matter_core: Error initializing Wi-Fi stack
[    55][E][Matter.cpp:173] begin(): Failed to start Matter, err:-1

@SuGlider
Copy link
Contributor

Failed with 16 EPs!

E (546) wifi:Expected to init 8 rx buffer, actual is 6
E (579) wifi_init: Failed to deinit Wi-Fi driver (0x3001)
E (579) wifi_init: Failed to deinit Wi-Fi (0x3001)
E (579) esp_matter_core: Error initializing Wi-Fi stack
[    55][E][Matter.cpp:173] begin(): Failed to start Matter, err:-1

@SuGlider
Copy link
Contributor

Still error with 8 EPs...

[    14][I][MatterEnhancedColorLight.cpp:213] begin(): Enhanced ColorLight created with endpoint_id 1
E (567) esp-aes: Failed to allocate memory
E (586) chip[CR]: mbedTLS error: ERROR - Generic error
E (586) chip[DL]: Entropy initialization failed: ac
E (587) esp_matter_core: Failed to initialize CHIP stack
E (590) esp_matter_core: Error initializing matter
[    58][E][Matter.cpp:173] begin(): Failed to start Matter, err:-1

Next Try: Disabling Thread....

Updated Matter settings to disable Thread and Wi-Fi configurations and increased maximum dynamic endpoint count.
@SuGlider
Copy link
Contributor

Ok. Based on the last test, it is mandatory to add WiFi and Thread support to the ESP32-C5.
But it has no enough memory in order run both within Arduino Matter setup.

Looking into ESP-Matter ESP32-C5 configuration, they allow only 3 end points.
This seems to be the best possible...

https://github.com/espressif/esp-matter/blob/main/examples/light/sdkconfig.defaults.c5_wifi_thread#L29

# This example use 3 dynamic endpoints: RootNode, light, and secondary network commissioning
CONFIG_ESP_MATTER_MAX_DYNAMIC_ENDPOINT_COUNT=3

@Nezaemmy - In order to allow WiFi, we must also setup Thread, which is already included with the Arduino OpenThread Library.
Therefore, both must be enabled and this causes a severe limitation for the number of EndPoints.

WiFi will work, but no more than maybe 4 end points per node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants